﻿using GN.Pay.TradeChannel.AliPay.Request;
using System;

namespace GN.Pay.TradeChannel.AliPay
{
    /// <summary>
    /// 支付宝即时到账
    /// </summary>
    [Serializable]
    public class AliPayTransferService : AliPayServiceBase
    {
        public AliPayTransferService() : base()
        {

        }

        public override string ChannelId
        {
            get
            {
                return "AliPay.Transfer";
            }
        }

        public override string ChannelName
        {
            get
            {
                return "支付宝即时到账";
            }
        }

        public override ChannelType ChannelType
        {
            get
            {
                return ChannelType.Web;
            }
        }

        /// <summary>
        /// 申请支付宝即时到账付款
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        public override ITradePayApplyResult PayApply(IOrderPayApply order)
        {
            var config = this.channelConfigure;
            var request = new TransferPayRequest(this, order, config);
            return request.Build(this, config);
        }
    }
}
